package org.jeecg.modules.complain.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.jeecg.modules.complain.entity.BaseCustomer;
import org.jeecg.modules.complain.entity.Repair;
import org.jeecg.modules.complain.entity.RepairConfig;
import org.jeecg.modules.system.entity.SysUser;

import java.util.List;


/**
 * @Description: 报修处理
 * @Author: jeecg-boot
 * @Date:   2019-07-29
 * @Version: V1.0
 */
public interface RepairMapper extends BaseMapper<Repair> {
    SysUser selectPhoneByUserId(@Param("userId") String userId);
    Repair selectRepairDetail(@Param("repairId") String repairId);
    BaseCustomer selectByRoomId(@Param("roomId") String roomId);
    RepairConfig selectByUserId(@Param("userId") String userId);
    RepairConfig selectConfigByDepartId(@Param("departId") String departId);
    Repair selectById(@Param("id") String id, @Param("status") String status);
    List<Repair> selectByStatus(@Param("status") String status);
    Integer updateRepairStatus(@Param("repairId") String repairId, @Param("status") Integer status);
    Repair selectByIds(@Param("repairId") String repairId);
    Integer getTotalByProjectId(@Param("projectId") String projectId);
    Integer getCompleteByProjectId(@Param("projectId") String projectId);
    String findRoomInfo(@Param("roomId") String roomId);
    @Select("select name from base_project where id = #{projectId} AND del_flag = '0'")
    String selectProjectName(@Param("projectId") String projectId);
    @Select("select floor_id from base_room where id = #{roomId} AND del_flag='0'")
    String selectFloor(@Param("roomId") String roomId);


    List<Repair> selectRepairExport(Repair repair);
}
